/*
day66_2
2019.11.2
*/

#include<iostream>
#include<vector>
using namespace std;

// Definition for a Node.
class Node {
public:
    int val;
    vector<Node*> children;

    Node() {}

    Node(int _val, vector<Node*> _children) {
        val = _val;
        children = _children;
    }
};


class Solution {
public:
	void preorder(Node *root,vector<int> &vec)
	{
		if(!root) return;
		vec.push_back(root->val);
		
		for(Node *cur : root->children)
		{
			preorder(cur,vec);
		}
		
	}
	
    vector<int> preorder(Node* root) {
        vector<int> vec;
        preorder(root,vec);
        return vec;
    }
    
};


int main()
{
	return 0;
}
